package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;


/**
 * The persistent class for the course_offering_student_enrolment database table.
 * 
 */
@Entity
@Table(name="course_offering_student_enrolment")
@NamedQueries({
@NamedQuery(name="CourseOfferingStudentEnrolment.findAll", query="SELECT c FROM CourseOfferingStudentEnrolment c"),
@NamedQuery(name="CourseOfferingStudentEnrolment.deleteById", query="DELETE FROM CourseOfferingStudentEnrolment WHERE id = :P1")
})
public class CourseOfferingStudentEnrolment implements Serializable {

	private static final long serialVersionUID = 3409184832384194916L;

	@EmbeddedId
	private CourseOfferingStudentEnrolmentPK id;

	@Column(name="attitude_mark")
	private BigDecimal attitudeMark;

	@Column(name="final_exam_mark")
	private BigDecimal finalExamMark;

	@Column(name="attendance_score")
	private BigDecimal attendanceScore; 

	//bi-directional many-to-one association to CourseOffering
    @MapsId("courseOfferingId")
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="course_offering_id", referencedColumnName = "course_offering_id")
	private CourseOffering courseOffering;

	//bi-directional many-to-one association to User
    @MapsId("studentId")
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name = "student_id", referencedColumnName = "student_id")
	private Student student;

	public CourseOfferingStudentEnrolmentPK getId() {
		return this.id;
	}

	public void setId(CourseOfferingStudentEnrolmentPK id) {
		this.id = id;
	}

	public BigDecimal getAttitudeMark() {
		return this.attitudeMark;
	}

	public void setAttitudeMark(BigDecimal attitudeMark) {
		this.attitudeMark = attitudeMark;
	}

	public BigDecimal getFinalExamMark() {
		return this.finalExamMark;
	}

	public void setFinalExamMark(BigDecimal finalExamMark) {
		this.finalExamMark = finalExamMark;
	}

	public BigDecimal getAttendanceScore() {
		return attendanceScore;
	}

	public void setAttendanceScore(BigDecimal attendanceScore) {
		this.attendanceScore = attendanceScore;
	}

	public CourseOffering getCourseOffering() {
		return this.courseOffering;
	}

	public void setCourseOffering(CourseOffering courseOffering) {
		this.courseOffering = courseOffering;
	}

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

}